<?
include_once 'lib/facebook.php';
include_once 'includes/config.php';
include_once 'includes/dbconnect.php';


$question_id = $_POST['question_id'];

$get_com = mysql_query("select count(*) as result from tbl_answer where question_id='$question_id' and answer='C'");
$get_mobile = mysql_query("select count(*) as result from tbl_answer where question_id='$question_id' and answer='M'");
$get_tab = mysql_query("select count(*) as result from tbl_answer where question_id='$question_id' and answer='T'");

$total_com = mysql_result($get_com, 0, "result");
$total_mobile = mysql_result($get_mobile, 0, "result");
$total_tab = mysql_result($get_tab, 0, "result");

echo "com=$total_com&mobile=$total_mobile&tab=$total_tab";
?>


